//
//  BodyInAABBCallback.h
//  Box2DProject
//
//  Created by Thi Huynh on 9/12/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

// Include STL vector class.
#include <map>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <vector>


//
//Class for query colision callback derive from b2QueryCallback
//
class BodiesInAABBCallback : public b2QueryCallback
{
public:
	virtual ~BodiesInAABBCallback() {}
    
	/// Called for each fixture found in the query AABB.
	/// @return false to terminate the query.
	bool ReportFixture(b2Fixture* fixture)
    {
        queryInfo[fixture->GetBody()] = fixture;
        return true;
    }
    std::map<b2Body*, b2Fixture*> queryInfo;
};
